const HOUSE_LIST = [
	{
		name: '无要求',
		value: 0,
	},
	{
		name: '有房',
		value: 1,
	}
]


export const getHouseStatusList = () => {
  const houseList = [...HOUSE_LIST];
  return houseList
}

export const getHouseStatusByIndex = ({ index } = {}) => {
	if (!Number.isInteger(index)) {
		return {
			name: "",
			value: null
		}
	}

  const houseList = getHouseStatusList();

	const value = houseList[index];
	return value
}

export const getHouseStatusByValue = ({ value } = {}) => {
	return getHouseStatusList().find(item => item.value === value) || {}
}